package com.arrogames.blondbattle.game.graphics 
{
	import com.arrogames.blondbattle.game.graphics.animation.Destroyable;
	import feathers.controls.Label;
	import starling.display.Sprite;
	import com.greensock.TweenLite;
	/**
	 * ...
	 * @author A.J. van Steenwijk
	 */
	public class HitIndicatorView extends Sprite implements Destroyable
	{
		
		private var label:Label;
		private var tweenComplete:Boolean = false;
		
		public function HitIndicatorView(pLabel:String) 
		{
			super();
			label = new Label();
			label.text = pLabel;
			
			this.addChild(label);
			TweenLite.to(label, 5, { alpha:0, onComplete:animationComplete});
		}
		
		private function animationComplete() : void 
		{
			tweenComplete = true;
		}
		
		public function getAnimationEnded() : Boolean
		{
			return tweenComplete;
		}
	}

}